{% extends "base/layui_base.html" %}

{% block title %}
	{{ super() }}
	{{ Fdata.titleAll }}
{% endblock %}

{% block main %}

	<div class="layui-row" style="padding:0px 15px 0px 15px;">
		<form class="layui-form" action="">

		  <div class="layui-form-item layui-row" >
		  <div class="layui-form-item">
		    <label class="layui-form-label">傲发账号</label>
		    <div class="layui-input-block">
		      <input type="text" name="account" required  placeholder="傲发帐号（发送即时传真时必填，如AF90000099）" autocomplete="off" class="layui-input">
		    </div>
		  </div>

		  <div class="layui-form-item" >
			    <label class="layui-form-label">发送人1</label>
			    <div class="layui-input-block">
			      <input type="text" name="sender1" required  placeholder="发件人1，标识传真发件人，如公司名" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		  <div class="layui-form-item" >
			    <label class="layui-form-label">发送人2</label>
			    <div class="layui-input-block">
			      <input type="text" name="sender2" required  placeholder="发件人2，标识传真发件人，如人名等" autocomplete="off" class="layui-input">
			    </div>
		    </div>

		  <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" lay-submit lay-filter="formDemo">修改</button>
		      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		  </div>
		</form>
	</div>

{% endblock %}

{% block js %}
<script>

layui.use(['jquery','form','common','layer','upload'], function(){
  var common = layui.common
  ,upload = layui.upload
  ,layer = layui.layer
  ,form = layui.form
  ,$ = layui.$

  //加载后自动执行
  layer.ready(function(){
  	common.ajax(
		'/get_config.html'
		,{'type':'load',formData:{}}
		,function(res){
		    layer.msg(JSON.stringify(res));
			common.wVal({
				'account':res.account
				,'sender1':res.sender1
				,'sender2':res.sender2
			})
	});
  });


  
  //监听提交
  form.on('submit(formDemo)', function(data){
	common.ajax(
		'/get_config.html'
		,{'type':'update','formData':data.field}
		,function(res){
		    layer.msg(JSON.stringify(res));
		}
	 );
    return false;
  });

});

</script>
{% endblock %}
